{{- /*
Indicates that the enclosed text is an extended quotation.

@param {string} author Author of the quote.
@param {string} url Link to quote.

@returns {template.HTML}

@examples

  {{< quote "Aldous Huxley" "https://example.com" >}}
  Words can be like X-rays, if you use them properly - they’ll go through anything. You read and you’re pierced.
  {{< /quote >}}
*/ -}}

{{- if (.IsNamedParams) -}}

    {{ $author := (.Get "author") }}
    {{ $url := (.Get "url") }}

    <div class="shortcode shortcode-{{ ($.Name) }}">
      <figure>
        <blockquote class="blockquote">
            {{ with (.Inner) }}{{ (. | $.Page.RenderString (dict "display" "block")) }}{{ end }}
        </blockquote>
          {{ with ($author) }}
            <figcaption class="blockquote-footer">
              <cite>
                  {{ with ($url) }}
                    <a href="{{ ($url) }}" target="_blank" rel="noopener nofollow">{{ (($author) | $.Page.RenderString) }}</a>
                  {{ else }}
                      {{ (($author) | $.Page.RenderString) }}
                  {{ end }}
              </cite>
            </figcaption>
          {{ end }}
      </figure>
    </div>

{{- else -}}

    {{ (partial "alerts/no_params" .) }}

{{- end -}}
